home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 52
/
Volume 52 - JOGO DISK .iso
/
Games
/
skipandgouls.swf
/
scripts
/
__Packages
/
objHSNick.as
< prev
next >
Wrap
Text File
|
2007-10-01
|
4KB
|
146 lines
class objHSNick
{
function objHSNick()
{
this.bHSAvailable = true;
this.G_TestHighScore = false;
this.bSubmitHS = false;
this.bGetHS = false;
this.G_GameID = "sb_ghouls";
this.mcHSZone = undefined;
if(this.G_TestHighScore == true)
{
_global.gProxyObj.setServer("www.nick.com");
_global.gProxyObj.setScreenName("dd_programmer");
_global.gProxyObj.setIsLoggedIn(true);
}
}
function getScores()
{
trace("getScore " + _global.gProxyObj);
if(_global.gProxyObj == undefined)
{
this.listScores();
}
else
{
_global.gProxyObj.getScores(this.cbFunc2);
}
}
function submitScore(theScore)
{
this.addMessage("The high score list is updating!");
_global.gProxyObj.submitScore(theScore,this.cbFunc);
}
function initHiScores()
{
_global.gProxyObj.setGame_Id(this.G_GameID);
}
function getScoreString()
{
var _loc8_ = "Oops! The high score list is not available right now!";
if(_global.gProxyObj != undefined)
{
var _loc7_ = _global.gProxyObj.getScoreCount();
trace(_loc7_);
if(_loc7_ > 0)
{
var _loc3_ = undefined;
var _loc4_ = undefined;
var _loc5_ = undefined;
var _loc6_ = undefined;
this.removeMessage();
_loc3_ = 0;
while(_loc3_ < _loc7_)
{
_loc8_ = "";
_loc4_ = _global.gProxyObj.getScoreItem(_loc3_);
_loc5_ = _loc4_[0];
trace(_loc5_);
_loc6_ = _loc4_[1];
_global.C.oPackaging.oHiScore.addEntry(_loc5_,_loc6_);
_loc3_ = _loc3_ + 1;
}
}
else
{
this.addMessage("Oops! The high score list is not available right now!");
}
}
else
{
this.addMessage("Oops! The high score list is not available right now!");
}
return _loc8_;
}
function listScores()
{
this.getScoreString();
}
function cbFunc(thisBool)
{
trace("cbFunc" + thisBool);
if(thisBool)
{
_global.oHS.listScores();
}
else
{
this.addMessage("Oops! The high score list is not available right now!");
}
}
function cbFunc2(thisBool)
{
trace("*" + thisBool);
if(thisBool)
{
_global.oHS.listScores();
}
else
{
this.addMessage("Oops! The high score list is not available right now!");
}
}
function fDoHSInit()
{
this.initHiScores();
if(_global.gProxyObj.getIsLoggedIn())
{
this.mcHSZone.btnSubmitHS._visible = true;
}
else
{
this.mcHSZone.btnSubmitHS._visible = false;
}
}
function fDoSubmitHS(l_mcStage)
{
this.bSubmitHS = true;
}
function fDoViewHS(l_mcStage, l_bFromGame)
{
this.bGetHS = true;
_global.KMC.startHighScore(l_mcStage,l_bFromGame);
}
function fSetHSBoard(P_mcRef)
{
this.mcHSZone = P_mcRef;
if(_global.gProxyObj.getIsLoggedIn())
{
this.mcHSZone.btnSubmitHS._visible = true;
}
else
{
this.mcHSZone.btnSubmitHS._visible = false;
}
}
function addMessage(l_sMsg)
{
_global.C.oPackaging.oHiScore.setMessage(l_sMsg);
}
function removeMessage()
{
_global.C.oPackaging.oHiScore.clearMessage();
}
}